﻿#ifndef HouseInfo_H
#define HouseInfo_H
#include<QString>
#include <QList>
#include <QMap>

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class HouseInfo
{
public:
    HouseInfo();
    HouseInfo(QString house, QString hotel, QString type, int price, int count,
                    QString area, int capacity, QString bedType, QString bathroom,
                    QString window, QString net, QString breakfast, QString media,
                    QString bathroomAcc = "", QString isFull = "", QString path = "");

    int getCount() const;
    int getPrice() const;
    int getCapacity() const;
    const QString& getArea() const;
    const QString &getHouse() const;
    const QString &getHotel() const;
    const QString &getIsFull() const;
    const QString &getType() const;
    const QString &getPhoto() const;
    const QString &getBedType() const;
    const QString &getBathroom() const;

    const QString &getNet() const;
    const QString &getBreakfast() const;
    const QString &getMedia() const;
    const QString &getWindow() const;
    const QString &getBathroomAcc() const;

    void setCount(int count);
    void setPrice(int price);
    void setCapacity(int capacity);
    void setArea(const QString& area);
    void setHouse(const QString& house);
    void setHotel(const QString& hotel);
    void setIsFull(const QString& isFull);
    void setType(const QString& type);
    void setPhoto(const QString& path);
    void setBedType(const QString& bedType);
    void setBathroom(const QString& bathroom);

    void setNet(const QString& net);
    void setBreakfast(const QString& breakfast);
    void setMedia(const QString& media);
    void setWindow(const QString& window);
    void setBathroomAcc(const QString& bathroomAcc);

private:
    int m_price;
    int m_count;
    int m_capacity;

    QString m_area;
    QString m_house;
    QString m_hotel;
    QString m_isFull;
    QString m_type;
    QString m_photo;
    QString m_bedType;
    QString m_bathroom;

    QString m_net;
    QString m_media;
    QString m_window;
    QString m_breakfast;
    QString m_bathroomAcc;
};

typedef QList<HouseInfo> HouseInfoList;
typedef QMap<QString, HouseInfoList::iterator> HouseInfoMap;  //网络操作使用


#endif // HouseInfo_H
